|
|
 |
|
|
|
|
' Return a B-spline knot value. Private Function Knot(ByVal i As Integer, _
ByVal max As Integer, ByVal degree As Integer) As Integer
If i < degree Then
Knot = 0
ElseIf i <= max Then
Knot = i - degree + 1
Else
Knot = max - degree + 2
End If
End Function |
|
|
|
|
|
|
|
|
Example program Bspline uses these routines to draw B-splines much as the program Bezier draws Bezier surfaces. Use the option buttons to select the surface you want to see. Use the arrow keys to change the viewing direction. Click the check boxes to make the program display the control points or the control grid. |
|
|
|
|
|
|
|
|
Example program Bspline2, shown in Figure 14.28, is a simple B-spline editor. Enter the number of control points you want in the X and Z directions, and click the Initialize |
|
|
|
|
|
|
|
|
Figure 14.28
Program Bspline2 editing a surface. |
|
|
|
|
|